
#include "stdafx.h"
#include "WicMetadataWriter.h"

CWicMetadataWriter::CWicMetadataWriter()
{
    m_pIWICMetadataWriter = NULL;
}

CWicMetadataWriter::~CWicMetadataWriter()
{
    if(m_pIWICMetadataWriter)
    {
        m_pIWICMetadataWriter->Release();
    }
    m_pIWICMetadataWriter = NULL;
}

CWicMetadataWriter::CWicMetadataWriter(CWicMetadataWriter const & objMetadataWriter)
{
    m_pIWICMetadataWriter = objMetadataWriter.m_pIWICMetadataWriter;
    m_pIWICMetadataWriter->AddRef();
}

CWicMetadataWriter& CWicMetadataWriter::operator=(CWicMetadataWriter const & objMetadataWriter)
{
    if(m_pIWICMetadataWriter)
    {
        m_pIWICMetadataWriter->Release();
    }
    m_pIWICMetadataWriter = objMetadataWriter.m_pIWICMetadataWriter;
    m_pIWICMetadataWriter->AddRef();
    return *this;
}
